package com.item.piketao.api;

import com.item.piketao.dao.SpecGroup;
import com.item.piketao.dao.SpecParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author: xinglongge
 * @Date: 2020/3/4 15 49
 * @Description:
 */
@RequestMapping("spec")
public interface SpecificationApi {
    /**
     * 根据条件查询规格参数
     * @param gid
     * @param cid
     * @param generic
     * @param search
     * @return
     */
    @GetMapping("params")
    List<SpecParam> queryParams(
            @RequestParam(value = "gid",required = false) Long gid,
            @RequestParam(value = "cid",required = false) Long cid,
            @RequestParam(value = "generic",required = false) Boolean generic,
            @RequestParam(value = "search",required = false) Boolean search);
}
